package com.cn.why.produce_pro.rabbit;

import com.cn.why.produce_pro.config.RabbitConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 消费者
 */
@Component
@RabbitListener(queues = RabbitConfig.QUEUE_A)//监听A队列
public class ReceiverMsg {

    @RabbitHandler
    public void process(String content){
        System.out.println("接收处理队列A当中的消息： "+content);
    }
}
